@extends('admin/layout')

@section('header')
    <!-- DataTables CSS -->
    {{ HTML::style('admin/css/plugins/dataTables.bootstrap.css'); }}
@stop

@section('content')
     <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">{{ $fnTitle }}</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->

    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    Basic Information
                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-lg-6">
                            {{ Form::open(array('url'=>'at-admin/user/register/'.($user && $user->id ? $user->id : "").'', 'class'=>'form-signup')) }}
                                <div class="form-group">
                                    <label>Role</label>
                                    {{ Form::select('role', array('1' => 'Supper Admin', '2' => 'Admin'), 2, array('class' => 'form-control')); }}
                                </div>
                            
                                <div class="form-group  
                                     @if ($errors->first('firstname'))
                                        {{ 'has-error' }}
                                     @endif ">
                                    <label>Firstname</label>
                                    {{ Form::text('firstname', $user && $user->firstname ? $user->firstname :'', array('class'=>'form-control', 'placeholder'=>'First Name')) }}
                                    <span class="help-inline">{{ $errors->first('firstname') }}</span>
                                </div>
                                <div class="form-group 
                                     @if ($errors->first('lastname'))
                                        {{ 'has-error' }}
                                     @endif ">
                                    <label>Lastname</label>
                                    {{ Form::text('lastname', $user && $user->lastname ? $user->lastname :'', array('class'=>'form-control', 'placeholder'=>'Last Name')) }}
                                    <span class="help-inline">{{ $errors->first('lastname') }}</span>
                                </div>
                                <div class="form-group 
                                     @if ($errors->first('email'))
                                        {{ 'has-error' }}
                                     @endif ">
                                    <label>Email</label>
                                    {{ Form::text('email', $user && $user->email ? $user->email :'', array('class'=>'form-control', 'placeholder'=>'Email Address')) }}
                                    <span class="help-inline">{{ $errors->first('email') }}</span>
                                </div>
                                <div class="form-group 
                                     @if ($errors->first('password'))
                                        {{ 'has-error' }}
                                     @endif ">
                                    <label>Password</label>
                                    {{ Form::password('password', array('class'=>'form-control', 'placeholder'=>'Password')) }}
                                    <span class="help-inline">{{ $errors->first('password') }}</span>
                                </div>
                                <div class="form-group 
                                     @if ($errors->first('password_confirmation'))
                                        {{ 'has-error' }}
                                     @endif ">
                                    <label>Confirm Password</label>
                                    {{ Form::password('password_confirmation', array('class'=>'form-control', 'placeholder'=>'Confirm Password')) }}
                                </div>
                            
                                {{ Form::submit('Save', array('class'=>'btn btn-primary'))}}

                                <button type="reset" class="btn btn-default">Reset Button</button>
                            {{ Form::close() }}
                        </div>
                        
                        </div>
                        <!-- /.col-lg-6 (nested) -->
                    </div>
                    <!-- /.row (nested) -->
                </div>
                <!-- /.panel-body -->
            </div>
            <!-- /.panel -->
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
@stop    

@section('footer')
 
@show